package com.atguigu;

import com.qiniu.common.QiniuException;
import com.qiniu.storage.BucketManager;
import com.qiniu.storage.Configuration;
import com.qiniu.storage.Region;
import com.qiniu.util.Auth;

public class qiniuTestDelete {
    final static String accessKey = "TYHMVuGpxupDATQaYERN8fPzBllC8MWuzjoGsjlE";
    final static String secretKey = "3tGcgqra7-FRnYFevt8UmFlXPG9KlMWLyEjr7TOy";
    final static String bucket = "classroomtest";
    final static String myFile="try_bingbing";
    public static void main(String[] args) {
        String s=util();
        System.out.println(s);
    }
    static String  util(){
        Auth auth=Auth.create(accessKey,secretKey);
        Configuration cfg=new Configuration(Region.region1());
        BucketManager bucketManager=new BucketManager(auth,cfg);
        try {
            bucketManager.delete(bucket,myFile);
        } catch (QiniuException e) {
            e.printStackTrace();
        }
        return null;
    }
}
